Skip to content

ci: auto-approve and merge API reference sync PRs#10853

Merged
anakin87 merged 5 commits intomainfrom
auto-approve-merge-api-prs
Mar 17, 2026
Merged

ci: auto-approve and merge API reference sync PRs#10853
anakin87 merged 5 commits intomainfrom
auto-approve-merge-api-prs

Conversation

@anakin87
Copy link
Copy Markdown
Member

@anakin87 anakin87 commented Mar 17, 2026

Related Issues

Proposed Changes:

  • create a workflow that detects automatically generated API reference sync PRs, approves and merges them
    • uses GitHub bot: it might work since the PR author is a different user (HaystackBot); should also be compatible with our repo settings
    • targets specific paths, PR author and branch names to restrict the scope
    • It uses --auto to merge PRs: they will be merged only after the required checks (from Branch Protection Rules) finish running. It's worth noting that Vercel deployments are not included in Branch Protection Rules, so we won't wait for them. To prevent broken builds (that, however, would not break the website), I already added a workflow to check API reference <-> Docusaurus compliance in ci: add workflow to check correct API reference generation #10843.

How did you test it?

I haven't found a good way to test it before merging.
Worst-case scenario: it won't approve and merge PRs. So it should be safe to merge.

Checklist

  • I have read the contributors guidelines and the code of conduct.
  • I have updated the related issue with new insights and changes.
  • I have added unit tests and updated the docstrings.
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I have documented my code.
  • I have added a release note file, following the contributors guidelines.
  • I have run pre-commit hooks and fixed any issue.

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
haystack-docs Ignored Ignored Preview Mar 17, 2026 5:18pm

Request Review

@anakin87 anakin87 marked this pull request as ready for review March 17, 2026 16:54
@anakin87 anakin87 requested a review from a team as a code owner March 17, 2026 16:54
@anakin87 anakin87 requested review from julian-risch and removed request for a team March 17, 2026 16:54
Copy link
Copy Markdown
Member

@julian-risch julian-risch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only one suggested change for a comment. Other than that the PR looks good to me!

jobs:
auto-approve-and-merge:
if: |
github.event.pull_request.user.login == 'HaystackBot' &&
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. HaystackBot is important here to prevent malicious users from creating PRs that get auto-merged.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

github.event.pull_request.head.repo.full_name == github.repository could be added to prevent forks from triggering this job but HaystackBot doesn't use forks anyway.
No change request.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added it to be extra-safe

Comment thread .github/workflows/auto_approve_api_ref_sync.yml Outdated
anakin87 and others added 3 commits March 17, 2026 18:14
Co-authored-by: Julian Risch <julian.risch@deepset.ai>
@anakin87 anakin87 requested a review from julian-risch March 17, 2026 17:18
Copy link
Copy Markdown
Member

@julian-risch julian-risch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

@anakin87 anakin87 merged commit 4838474 into main Mar 17, 2026
19 checks passed
@anakin87 anakin87 deleted the auto-approve-merge-api-prs branch March 17, 2026 17:21
@anakin87
Copy link
Copy Markdown
Member Author

Works: #10854

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants